// 书签类型定义
export interface Bookmark {
  id: string;
  title: string;
  url: string;
  favicon?: string;
  dateAdded: number;
  categories: Category[];
  parentId: string | null;
}

// 书签树节点
export interface BookmarkTreeNode {
  id: string;
  title: string;
  url?: string;
  dateAdded?: number;
  parentId?: string;
  children?: BookmarkTreeNode[];
}

// 分类类型定义
export interface Category {
  id: string;
  name: string;
  isCustom?: boolean;
}

// 网络图谱数据结构
export interface GraphNode {
  id: string;
  title: string;
  url: string;
  group: number; // 基于分类
  
  // D3 力模拟所需属性
  index?: number;
  x?: number;
  y?: number;
  vx?: number;
  vy?: number;
  fx?: number | null;
  fy?: number | null;
}

export interface GraphLink {
  source: string | GraphNode;
  target: string | GraphNode;
  value: number; // 连接强度
}

export interface GraphData {
  nodes: GraphNode[];
  links: GraphLink[];
} 